<template>
	<view class="user-release-page page">
		<view class="category-tab">
			<view style="border-radius: 5px 0 0 5px;" @click="conf.type=1" :class="conf.type==1?'active':''"
				class="tab-item">发布职位</view>
			<view style="border-radius: 0 5px 5px 0;" @click="conf.type=2" :class="conf.type==2?'active':''"
				class="tab-item">种子集市</view>
		</view>
		<view class="status-tab">
			<view @click="conf.status=-1" :class="conf.status==-1?'active':''" class="tab-item">全部</view>
			<view @click="conf.status=0" :class="conf.status==0?'active':''" class="tab-item">待审核</view>
			<view @click="conf.status=1" :class="conf.status==1?'active':''" class="tab-item">已通过</view>
			<view @click="conf.status=2" :class="conf.status==2?'active':''" class="tab-item">未通过</view>
		</view>
		<view class="list-block" v-if="conf.type==1">
			<view class="empty">暂无数据</view>
			<template v-if="list.length>0">
				<WorkList :key="item.id" :data="item" v-for="(item) in list" type="2">
				</WorkList>
			</template>
			<view v-if="more==false&&list.length==0" class="empty">暂无数据</view>
			<view v-else-if="more==false&&list.length>0" class="empty">没有更多了</view>
		</view>
		<view class="list-block" v-else>
			<template v-if="list2.length>0">
				<ListItem :key="item.id" :data="item" v-for="(item) in list2" type="2"></ListItem>
			</template>
			<view v-if="more==false&&list2.length==0" class="empty">暂无数据</view>
			<view v-else-if="more==false&&list2.length>0" class="empty">没有更多了</view>
		</view>
	</view>
</template>

<script>
	import ListItem from '@/components/ListItem.vue'
	import WorkList from '@/components/WorkList.vue'
	export default {
		components: {
			ListItem,
			WorkList
		},
		data() {
			return {
				conf: {
					page: 1,
					limit: 20,
					type: 1,
					status: -1
				},
				list: [
					// {
					// 	id: 1,
					// 	jobTitle: '农业技术员',
					// 	minSalary: 3000,
					// 	maxSalary: 6000,
					// 	worry: 1,
					// 	jobAddress: '酒泉市肃州区果园镇政府街12号',
					// 	distances: 3.6,
					// 	logoUrl: '/static/images/logoUrl.png',
					// 	enterpriseName: '酒泉某某某某种⼦有限公司'
					// },
					// {
					// 	id: 2,
					// 	jobTitle: '农业技术员',
					// 	minSalary: 3000,
					// 	maxSalary: 6000,
					// 	worry: 1,
					// 	jobAddress: '酒泉市肃州区果园镇政府街12号',
					// 	distances: 3.6,
					// 	logoUrl: '/static/images/logoUrl.png',
					// 	enterpriseName: '酒泉某某某某种⼦有限公司'
					// },
					// {
					// 	id: 3,
					// 	jobTitle: '农业技术员',
					// 	minSalary: 3000,
					// 	maxSalary: 6000,
					// 	worry: 1,
					// 	jobAddress: '酒泉市肃州区果园镇政府街12号',
					// 	distances: 3.6,
					// 	logoUrl: '/static/images/logoUrl.png',
					// 	enterpriseName: '酒泉某某某某种⼦有限公司'
					// },
					// {
					// 	id: 4,
					// 	jobTitle: '农业技术员',
					// 	minSalary: 3000,
					// 	maxSalary: 6000,
					// 	worry: 1,
					// 	jobAddress: '酒泉市肃州区果园镇政府街12号',
					// 	distances: 3.6,
					// 	logoUrl: '/static/images/logoUrl.png',
					// 	enterpriseName: '酒泉某某某某种⼦有限公司'
					// }
				],
				list2: [
					// {
					// 	id: 1,
					// 	image: 'https://suzhou-polite-1306862033.cos.ap-chengdu.myqcloud.com/suzhouzhongzi/home-list-bg.jpg',
					// 	name: '玉米种子出售',
					// 	price: '50',
					// 	describe: '⽟⽶草种⼦ 当季进⼝⾼产牧草草籽 多产',
					// 	address: '酒泉市肃州区金佛寺镇',
					// 	distance: '16.4'
					// },
					// {
					// 	id: 2,
					// 	image: 'https://suzhou-polite-1306862033.cos.ap-chengdu.myqcloud.com/suzhouzhongzi/home-list-bg.jpg',
					// 	name: '玉米种子出售',
					// 	price: '50',
					// 	describe: '⽟⽶草种⼦ 当季进⼝⾼产牧草草籽 多产',
					// 	address: '酒泉市肃州区金佛寺镇',
					// 	distance: '16.4'
					// },
					// {
					// 	id: 3,
					// 	image: 'https://suzhou-polite-1306862033.cos.ap-chengdu.myqcloud.com/suzhouzhongzi/home-list-bg.jpg',
					// 	name: '水果玉米',
					// 	price: '50',
					// 	describe: '⽔果⽟⽶甜⽟⽶棒10袋*220g，新鲜蔬菜',
					// 	address: '盒铧尖镇铧尖村8组12号',
					// 	distance: '21.6'
					// },
					// {
					// 	id: 4,
					// 	image: 'https://suzhou-polite-1306862033.cos.ap-chengdu.myqcloud.com/suzhouzhongzi/home-list-bg.jpg',
					// 	name: '玉米种子出售',
					// 	price: '50',
					// 	describe: '⽟⽶草种⼦ 当季进⼝⾼产牧草草籽 多产',
					// 	address: '酒泉市肃州区金佛寺镇',
					// 	distance: '16.4'
					// }
				],
				more: true
			}
		},
		watch: {

		},
		methods: {

		},
	}
</script>

<style lang="scss" scoped>
	.user-release-page {
		padding: 30rpx;

		.category-tab {
			width: 100%;
			display: flex;
			align-items: center;
			justify-content: center;
			margin-bottom: 30rpx;

			.tab-item {
				width: 200rpx;
				border: 1px solid $theme-color;
				height: 70rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				color: $theme-color;
				font-size: 28rpx;
			}

			.tab-item.active {
				background: $theme-color;
				color: #fff;
			}
		}

		.status-tab {
			width: 100%;
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-bottom: 30rpx;

			.tab-item {
				width: calc(25% - 10rpx);
				height: 60rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				color: #000;
				font-size: 28rpx;
				background: #fff;
				border-radius: 5px;
			}

			.tab-item.active {
				background: $theme-color;
				color: #fff;
			}
		}
	}
</style>